<template>
	<div class="pinderation" style="margin-top: 0;">
		<div class="identity-type">
			<span>基本信息</span>
			<span class="zjInfo" @click="zjBtn">质检信息</span>
		</div>
		<div class="essen_list">
			<p>
				<span>车牌号</span>
				<b class="carNo">{{content.carNo}}</b>
			</p>
			<p>
				<span>司机姓名</span>
				<b class="driver">{{content.driver}}</b>
			</p>
			<p>
				<span>司机电话</span>
				<b class="phone">{{content.phone}}</b>
			</p>
			<p>
				<span>收货时间</span>
				<b class="time">{{content.receiveTimeStr}}</b>
			</p>
			<p>
				<span>数量合计</span>
				<b class="numberTotal">{{content.count}}</b>
			</p>
			<p>
				<span>重量合计</span>
				<b class="weightTotal">{{content.weight}}</b>
			</p>
		</div>
		<div id="nameWarp">
			<div class="nameWarp" v-for="(item,index) in content.list" :key='index'>
				<div class="firstName">
					<span>{{item.firstParentName}}</span>
					<span>{{item.counts}}台</span>
					<span>{{item.weightCount}}KG</span> 
				</div>
				<ul class="childName">
					<li v-for="(item2,index2) in item.materialList" :key='index2'>
						<span>{{item2.materialName}}</span>
						<span>{{item2.counts}}台</span>
						<span>{{item2.weightCount}}KG</span>
					</li>
				</ul>
			</div>
		</div>

		<div class="seePonderation">
			<div class="demos-content-padded" v-show="this.$route.query.enterStatus!=1">
				<a href="javascript:;" @click="btnClick" class="weui-btn weui-btn_primary">确认过磅信息</a>
			</div>

		</div>

	</div>
</template>

<script>
	import { getMteGuobangInfo } from '../../config/api'
	import { TopTips } from 'we-vue'
	export default {
		data() {
			return {
				carId:this.$route.query.carId,
				content:'',
				orderNo:'',
				carNo:''
			}
		},
		created(){
			getMteGuobangInfo(this.carId).then(res=>{
				console.log(res)
				if(res.code==100){
					this.content = res.content
					this.orderNo = res.content.contractId
					this.carNo = res.content.carId
				}else{
					TopTips({
					  message: '暂无数据',
					  duration: 1200
					})
				}
				
			})
		},methods: {
			btnClick() {
				this.$router.push({
					path:'/autograph',
					query:{
						orderNo:this.orderNo,
						carNo:this.carNo
					}
				})
			},
			zjBtn(){
				this.$router.push({
					path:'/qualityInformation',
					query:{
						carId:this.carId
					}
				})
			}
		},
	}
</script>

<style scoped="scoped" lang="css">
	.nameWarp,.childName{
			width: 100%;
			height: auto;
			overflow: hidden;
		}
		.nameWarp .firstName{
			width: 100%;
			height: 1.55rem;
			background: #eee;
			line-height: 1.55rem;
		}
		.childName li{
			width: 100%;
			height: 1.55rem;
			font-size:0.75rem ;
			line-height: 1.55rem;
			border-bottom: 1px solid #eee;
		}
		.firstName span:nth-of-type(1){
			display: inline-block;
			float: left;
			width: 50%;
			padding-left:1.1rem;
			box-sizing: border-box;
		}
		.firstName span:nth-of-type(2),.childName li span:nth-of-type(2){
			display: inline-block;
			float: left;
			width: 25%;
		}
		.firstName span:nth-of-type(3),.childName li span:nth-of-type(3){
			display: inline-block;
			float: left;
			width: 25%;
			text-align: center;
			box-sizing: border-box;
		}
		.childName li span:nth-of-type(1){
			display: inline-block;
			float: left;
			width: 50%;
			padding-left:1.1rem;
			box-sizing: border-box;
		}
		.pinderation .identity-type span{
			color:#666 ;
		}
		.pinderation .identity-type .zjInfo{
			color: #28c81e;
			display: inline-block;
			float: right;
			padding-right: 1.15rem;
		}
</style>
